package com.itheima.controller;

import com.itheima.poko.PageQuery;
import com.itheima.poko.PageResult;
import com.itheima.poko.Result;
import com.itheima.poko.User;
import com.itheima.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class UserConrtoller {


    @Autowired
    private UserService userService;

    @PostMapping("/user")
    public PageResult page(@RequestBody PageQuery<User> pageQuery){
        PageResult pageResult = userService.page(pageQuery);
        return pageResult;
    }


}
